package day02;

public class DataTypeCastDemo {
    public static void main(String[] args) {
        /*
        int a=10;
        long b=a;
        int c=50;
        double i=c;
        int x=(int)c;
        System.out.println(x);

        char z='a';
        int m=z;
        System.out.println(m);
        */
        byte b1=5;
        byte b2=6;
        byte b3=(byte)(b1+b2);
        System.out.println((byte)(b1+b2));
        System.out.println(2+2);
        System.out.println(2+'2');
        System.out.println('2'+'2');
        System.out.println('2');//2,因为没有运算，所以输出的是字符2

        int m='a';
        System.out.println(m);  //97，查看字符对应的码
        char n=97;
        System.out.println(n);  //a,查看码对应的字符

    }
}
